package com.ithaohao.mapper;

import com.ithaohao.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {

    @Select("select count(*) from user where username = #{username}")
    int userExists(String username);

    @Insert("insert into user (username, password) VALUES (#{username},#{password})")
    void login(User user);

}
